﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CHGK.web.UI.Core
{
    public class Password
    {
        public string CreatePassword(int length)
        {
            char[] SymbolLibrary = "1234567890abcdefghijklmnopqrstuvwxyz".ToCharArray();
            char[] Password = new char[length];
            Random rnd = new Random();

            for (int i = 0; i < length; i++)
            {
                Password[i] = SymbolLibrary[rnd.Next(0, SymbolLibrary.Length-1)];
            }

            return new string(Password);
        }
    }
}